import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/apply_business_info_entity.dart';

ApplyBusinessInfoEntity $ApplyBusinessInfoEntityFromJson(Map<String, dynamic> json) {
	final ApplyBusinessInfoEntity applyBusinessInfoEntity = ApplyBusinessInfoEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		applyBusinessInfoEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		applyBusinessInfoEntity.msg = msg;
	}
	final ApplyBusinessInfoData? data = jsonConvert.convert<ApplyBusinessInfoData>(json['data']);
	if (data != null) {
		applyBusinessInfoEntity.data = data;
	}
	return applyBusinessInfoEntity;
}

Map<String, dynamic> $ApplyBusinessInfoEntityToJson(ApplyBusinessInfoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

ApplyBusinessInfoData $ApplyBusinessInfoDataFromJson(Map<String, dynamic> json) {
	final ApplyBusinessInfoData applyBusinessInfoData = ApplyBusinessInfoData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		applyBusinessInfoData.id = id;
	}
	final String? userId = jsonConvert.convert<String>(json['user_id']);
	if (userId != null) {
		applyBusinessInfoData.userId = userId;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		applyBusinessInfoData.type = type;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		applyBusinessInfoData.name = name;
	}
	final String? province = jsonConvert.convert<String>(json['province']);
	if (province != null) {
		applyBusinessInfoData.province = province;
	}
	final String? city = jsonConvert.convert<String>(json['city']);
	if (city != null) {
		applyBusinessInfoData.city = city;
	}
	final String? area = jsonConvert.convert<String>(json['area']);
	if (area != null) {
		applyBusinessInfoData.area = area;
	}
	final String? provinceId = jsonConvert.convert<String>(json['province_id']);
	if (provinceId != null) {
		applyBusinessInfoData.provinceId = provinceId;
	}
	final String? cityId = jsonConvert.convert<String>(json['city_id']);
	if (cityId != null) {
		applyBusinessInfoData.cityId = cityId;
	}
	final String? areaId = jsonConvert.convert<String>(json['area_id']);
	if (areaId != null) {
		applyBusinessInfoData.areaId = areaId;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		applyBusinessInfoData.address = address;
	}
	final String? lon = jsonConvert.convert<String>(json['lon']);
	if (lon != null) {
		applyBusinessInfoData.lon = lon;
	}
	final String? lat = jsonConvert.convert<String>(json['lat']);
	if (lat != null) {
		applyBusinessInfoData.lat = lat;
	}
	final String? logo = jsonConvert.convert<String>(json['logo']);
	if (logo != null) {
		applyBusinessInfoData.logo = logo;
	}
	final String? categoryId = jsonConvert.convert<String>(json['category_id']);
	if (categoryId != null) {
		applyBusinessInfoData.categoryId = categoryId;
	}
	final String? labels = jsonConvert.convert<String>(json['labels']);
	if (labels != null) {
		applyBusinessInfoData.labels = labels;
	}
	final String? occupantName = jsonConvert.convert<String>(json['occupant_name']);
	if (occupantName != null) {
		applyBusinessInfoData.occupantName = occupantName;
	}
	final String? occupantId = jsonConvert.convert<String>(json['occupant_id']);
	if (occupantId != null) {
		applyBusinessInfoData.occupantId = occupantId;
	}
	final String? frontPhoto = jsonConvert.convert<String>(json['front_photo']);
	if (frontPhoto != null) {
		applyBusinessInfoData.frontPhoto = frontPhoto;
	}
	final String? backPhoto = jsonConvert.convert<String>(json['back_photo']);
	if (backPhoto != null) {
		applyBusinessInfoData.backPhoto = backPhoto;
	}
	final String? isCertificates = jsonConvert.convert<String>(json['is_certificates']);
	if (isCertificates != null) {
		applyBusinessInfoData.isCertificates = isCertificates;
	}
	final String? licensePhoto = jsonConvert.convert<String>(json['license_photo']);
	if (licensePhoto != null) {
		applyBusinessInfoData.licensePhoto = licensePhoto;
	}
	final String? creditCode = jsonConvert.convert<String>(json['credit_code']);
	if (creditCode != null) {
		applyBusinessInfoData.creditCode = creditCode;
	}
	final String? validityType = jsonConvert.convert<String>(json['validity_type']);
	if (validityType != null) {
		applyBusinessInfoData.validityType = validityType;
	}
	final String? licenseTime = jsonConvert.convert<String>(json['license_time']);
	if (licenseTime != null) {
		applyBusinessInfoData.licenseTime = licenseTime;
	}
	final String? factoryCertificate = jsonConvert.convert<String>(json['factory_certificate']);
	if (factoryCertificate != null) {
		applyBusinessInfoData.factoryCertificate = factoryCertificate;
	}
	final String? inspectionReport = jsonConvert.convert<String>(json['inspection_report']);
	if (inspectionReport != null) {
		applyBusinessInfoData.inspectionReport = inspectionReport;
	}
	final String? approveReport = jsonConvert.convert<String>(json['approve_report']);
	if (approveReport != null) {
		applyBusinessInfoData.approveReport = approveReport;
	}
	final String? sanitaryPermits = jsonConvert.convert<String>(json['sanitary_permits']);
	if (sanitaryPermits != null) {
		applyBusinessInfoData.sanitaryPermits = sanitaryPermits;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		applyBusinessInfoData.status = status;
	}
	final String? reason = jsonConvert.convert<String>(json['reason']);
	if (reason != null) {
		applyBusinessInfoData.reason = reason;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		applyBusinessInfoData.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		applyBusinessInfoData.updatedAt = updatedAt;
	}
	final String? categoryName = jsonConvert.convert<String>(json['category_name']);
	if (categoryName != null) {
		applyBusinessInfoData.categoryName = categoryName;
	}
	return applyBusinessInfoData;
}

Map<String, dynamic> $ApplyBusinessInfoDataToJson(ApplyBusinessInfoData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['user_id'] = entity.userId;
	data['type'] = entity.type;
	data['name'] = entity.name;
	data['province'] = entity.province;
	data['city'] = entity.city;
	data['area'] = entity.area;
	data['province_id'] = entity.provinceId;
	data['city_id'] = entity.cityId;
	data['area_id'] = entity.areaId;
	data['address'] = entity.address;
	data['lon'] = entity.lon;
	data['lat'] = entity.lat;
	data['logo'] = entity.logo;
	data['category_id'] = entity.categoryId;
	data['labels'] = entity.labels;
	data['occupant_name'] = entity.occupantName;
	data['occupant_id'] = entity.occupantId;
	data['front_photo'] = entity.frontPhoto;
	data['back_photo'] = entity.backPhoto;
	data['is_certificates'] = entity.isCertificates;
	data['license_photo'] = entity.licensePhoto;
	data['credit_code'] = entity.creditCode;
	data['validity_type'] = entity.validityType;
	data['license_time'] = entity.licenseTime;
	data['factory_certificate'] = entity.factoryCertificate;
	data['inspection_report'] = entity.inspectionReport;
	data['approve_report'] = entity.approveReport;
	data['sanitary_permits'] = entity.sanitaryPermits;
	data['status'] = entity.status;
	data['reason'] = entity.reason;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	data['category_name'] = entity.categoryName;
	return data;
}